#include "stdafx.h"
#include "Mind.h"

Mind::Mind()
{
}

//Mind::~Mind()
//{
//}

void Mind::Shuffle()
{
	for (int i = 0; i < NEURONS_TOTAL; ++i)
	{
		Potentioal[i] = 0;
		Shift[i] = 0;
		Push[i] = 0;
		for (int j = 0; j < NEURONS_TOTAL; ++j)
		{
			Synapse[i * i] = 0;
		}
	}
}
void Mind::Think()
{
	for (int i = 0; i < NEURONS_TOTAL * THINK_CYCLES; ++i)
	{
		Potentioal[i] += Push[i] + Shift[i];
		Push[i] = 0;
		if (Potentioal[i] > 1.f)
		{
			Potentioal[i] = 0.f;
			for (int j = 0; j < NEURONS_TOTAL; ++j)
				Push[j] += Synapse[i * j];
		}
	}
}
